% fname: routing_dyad_0_6__sel_bufferlevel__topology_8x8__.m
% ./noxim -routing dyad 0.6 -sel bufferlevel -dimx 8 -dimy 8  -sim 10000 -warmup 2000 -size 8 8 -buffer 8 -hs 6 0.2 -hs 7 0.2 -hs 14 0.2 -hs 15 0.2 

function [max_pir, max_throughput, min_delay] = routing_dyad_0_6__sel_bufferlevel__topology_8x8__(symbol)

data = [
%             pir      avg_delay     throughput      max_delay       rpackets         rflits
           0.0018        22.2355      0.0146947            112            896           7171
           0.0018        22.9736      0.0156703            135            908           7271
           0.0018        23.4629      0.0151944            122            957           7658
           0.0018        23.7683      0.0147681            187            915           7325
           0.0018        21.1944      0.0149539             88            854           6819
           0.0018        22.3502      0.0152303            100            868           6945
           0.0018        22.1316      0.0149508            120            912           7296
           0.0018        25.4401      0.0151271            174            893           7140
           0.0018        22.5843      0.0143889            160            907           7252
           0.0018        22.4321       0.014748            112            928           7433
           0.0018        22.6993      0.0146472            101            908           7265
           0.0018        22.2543      0.0155805            144            920           7354
           0.0018        23.9039      0.0141523            181            905           7246
           0.0018         22.615      0.0153729            134            922           7379
           0.0018        23.8902      0.0143789            140            920           7362
           0.0018        22.6033      0.0153437            103            920           7365
           0.0018        24.8295      0.0148852            198            909           7264
           0.0018        22.1057      0.0151479            103            908           7271
           0.0018          23.52      0.0154062            117            925           7395
           0.0018        23.4747      0.0145861            119            889           7118
           0.0019         23.464      0.0152083            113            959           7665
           0.0019          24.96      0.0156956            217            975           7785
           0.0019        23.8101       0.015127            151            953           7624
           0.0019        26.2941      0.0169857            165           1037           8289
           0.0019        23.3017      0.0157008            155            958           7662
           0.0019         22.078      0.0150137             92            961           7687
           0.0019        23.7222      0.0160348            144            979           7825
           0.0019        22.6558      0.0150298            113            947           7575
           0.0019        24.6223       0.015873            216            969           7746
           0.0019        23.4143      0.0156066            236            951           7616
           0.0019        23.9315      0.0159609            143           1022           8172
           0.0019        24.6111      0.0156578            157            954           7641
           0.0019        21.8833      0.0148457             99            951           7601
           0.0019        23.6486      0.0152619            134            962           7692
           0.0019        25.1056      0.0163246            162           1013           8097
           0.0019        23.5465      0.0160907            136            999           7981
           0.0019        23.7693      0.0157271            136            945           7549
           0.0019        24.7001      0.0167958            184           1007           8062
           0.0019        25.8337      0.0159863            136           1022           8185
           0.0019        20.9558      0.0143571            106            905           7236
            0.002         25.348      0.0158185            148            980           7846
            0.002        24.4959       0.016123            133            984           7868
            0.002        25.0703      0.0162599            163           1024           8195
            0.002        26.8386      0.0162832            157           1041           8337
            0.002         27.834      0.0155423            299            964           7709
            0.002        25.4986      0.0169426            131           1035           8268
            0.002        24.6254      0.0172167            193           1033           8264
            0.002        26.2246      0.0172889            130           1055           8437
            0.002        25.3581      0.0160556            125           1011           8092
            0.002        26.2637      0.0159073            181            986           7890
            0.002        27.5784      0.0172875            238           1039           8298
            0.002        25.9029      0.0177349            160           1030           8229
            0.002        23.8948      0.0156074            152            998           7991
            0.002        25.6119      0.0152324            134            974           7799
            0.002         26.575      0.0169226            148           1066           8529
            0.002        23.1162      0.0158353            121            998           7981
            0.002        22.9882      0.0172945            115           1020           8163
            0.002        26.0905      0.0163036            130           1028           8217
            0.002        25.7604      0.0166034            159            964           7704
            0.002        27.1491      0.0161639            174            986           7888
           0.0021         26.935      0.0171169            160           1061           8490
           0.0021        24.3964      0.0171391            151           1062           8501
           0.0021        26.0364      0.0178813            125           1072           8583
           0.0021        26.4111      0.0170717            187           1041           8331
           0.0021        26.3806      0.0180792            150           1085           8678
           0.0021        26.8843       0.016875            365           1080           8640
           0.0021        26.0855      0.0178413            139           1123           8992
           0.0021        25.6379      0.0165655            135           1044           8349
           0.0021        27.5568      0.0170278            244           1074           8582
           0.0021          24.87      0.0169919            162           1054           8428
           0.0021        25.5373      0.0184004            214           1085           8685
           0.0021        24.1221      0.0171742            152           1048           8381
           0.0021        26.3631      0.0178891            152           1110           8873
           0.0021        26.9527      0.0164286            218           1035           8280
           0.0021         28.516      0.0168234            246           1060           8479
           0.0021        31.1577      0.0179147            306           1129           9029
           0.0021        25.0152      0.0164414            138           1053           8418
           0.0021        29.6364      0.0172246            171           1103           8819
           0.0021        25.5339      0.0173066            142           1107           8861
           0.0021         25.375       0.017957            141           1096           8763
           0.0022        29.5813      0.0184315            203           1144           9142
           0.0022        27.4205      0.0170456            125           1075           8591
           0.0022        25.9447      0.0171783            136           1049           8383
           0.0022        30.7278      0.0177282            272           1117           8935
           0.0022        27.6278      0.0167227            176           1072           8562
           0.0022        27.7002      0.0177643            316           1084           8669
           0.0022        25.5951      0.0176542            153           1062           8474
           0.0022        27.2676        0.01875            161           1125           9000
           0.0022        31.6818      0.0175781            332           1125           9000
           0.0022         28.089      0.0178155            194           1123           8979
           0.0022        31.5526      0.0183869            313           1160           9267
           0.0022        29.7661      0.0192319            283           1193           9539
           0.0022        26.4873      0.0169028            165           1065           8519
           0.0022        26.7786      0.0174861            219           1102           8813
           0.0022        28.1586      0.0171369            185           1078           8637
           0.0022        26.6496      0.0173373            153           1093           8738
           0.0022        27.5838      0.0180218            228           1134           9083
           0.0022        27.1582      0.0178906            143           1144           9160
           0.0022        29.8932      0.0184113            276           1142           9132
           0.0022        29.7321      0.0177897            269           1120           8966
           0.0023        29.9412      0.0197602            222           1207           9643
           0.0023        28.5111      0.0182036            158           1129           9029
           0.0023        30.2491      0.0179683            310           1132           9056
           0.0023         35.369      0.0194484            225           1225           9802
           0.0023        33.7649       0.019332            280           1178           9434
           0.0023        30.1265      0.0190081            173           1178           9428
           0.0023        29.3301      0.0180317            177           1136           9088
           0.0023        35.5412      0.0201613            232           1249          10000
           0.0023        30.8182      0.0187363            306           1199           9593
           0.0023        31.3036      0.0194258            165           1245           9946
           0.0023        30.1207      0.0183972            219           1143           9125
           0.0023         33.287      0.0187891            196           1202           9620
           0.0023        33.4614      0.0197659            228           1244           9962
           0.0023        37.9341      0.0183008            591           1169           9370
           0.0023        38.3291      0.0200833            255           1264          10122
           0.0023        31.1014      0.0181699            197           1164           9303
           0.0023        28.1838      0.0181694            156           1126           9012
           0.0023        31.6331       0.019256            191           1213           9705
           0.0023        32.2754      0.0173611            300           1093           8750
           0.0023        34.7627      0.0193105            213           1197           9578
           0.0024        34.3193       0.019709            199           1262          10091
           0.0024        31.0624      0.0208571            245           1314          10512
           0.0024        32.1573      0.0189702            198           1195           9561
           0.0024          30.51      0.0195273            223           1249           9998
           0.0024        30.5437      0.0200553            171           1225           9787
           0.0024        34.6208      0.0205041            369           1250          10006
           0.0024        38.8583      0.0193828            661           1242           9924
           0.0024        34.2396      0.0193145            222           1198           9580
           0.0024        31.9026      0.0193909            173           1222           9773
           0.0024        44.1805      0.0200586            469           1285          10270
           0.0024        30.8553      0.0200536            215           1265          10107
           0.0024        38.7555      0.0206492            484           1280          10242
           0.0024        32.2712      0.0197319            252           1224           9787
           0.0024         29.941      0.0199147            187           1255          10037
           0.0024         37.778      0.0199524            434           1257          10056
           0.0024        39.6507      0.0202813            327           1297          10384
           0.0024        31.7454      0.0195762            207           1253          10023
           0.0024        36.9952      0.0199504            464           1258          10055
           0.0024        35.8108      0.0193327            310           1200           9589
           0.0024        37.7377      0.0203217            314           1239           9917
           0.0025          35.54      0.0195444            217           1213           9694
           0.0025        39.8722      0.0200726            507           1244           9956
           0.0025        41.6942      0.0198333            591           1249           9996
           0.0025        36.9564      0.0200139            231           1261          10087
           0.0025        34.7034      0.0192852            244           1234           9874
           0.0025         38.631      0.0203571            334           1282          10260
           0.0025        34.2415      0.0197969            252           1267          10136
           0.0025        37.1632      0.0217417            332           1305          10436
           0.0025        40.1315      0.0202937            554           1278          10228
           0.0025        34.1142      0.0205595            316           1296          10362
           0.0025         35.795      0.0198965            287           1273          10187
           0.0025        50.5155      0.0205996            865           1319          10547
           0.0025        30.6812      0.0207163            236           1305          10441
           0.0025         42.353      0.0206766            531           1303          10421
           0.0025        38.8749      0.0201048            514           1247           9972
           0.0025        41.7349       0.019668            671           1260          10070
           0.0025        37.5366      0.0198367            333           1230           9839
           0.0025         38.503      0.0205996            321           1318          10547
           0.0025        30.4476      0.0195516            175           1231           9854
           0.0025        32.6521      0.0200859            189           1285          10284
           0.0026        46.9676      0.0211855            632           1356          10847
           0.0026        37.2415      0.0207031            220           1325          10600
           0.0026        45.7489      0.0204063            379           1306          10448
           0.0026        38.0623      0.0203849            370           1285          10274
           0.0026        40.0104      0.0209629            315           1342          10733
           0.0026        45.2153      0.0221988            458           1356          10833
           0.0026        48.9528      0.0211777            382           1355          10843
           0.0026         40.379      0.0218586            614           1335          10667
           0.0026        40.0917      0.0201094            479           1287          10296
           0.0026        44.8427      0.0211699            424           1354          10839
           0.0026        48.6951      0.0207129            417           1325          10605
           0.0026        37.9043      0.0209141            408           1337          10708
           0.0026        34.8526      0.0201367            291           1289          10310
           0.0026        41.7827      0.0209883            418           1344          10746
           0.0026        43.4325      0.0216523            348           1385          11086
           0.0026        38.4895      0.0208044            351           1289          10319
           0.0026        49.0759      0.0225524            609           1397          11186
           0.0026        37.4323      0.0214844            264           1374          11000
           0.0026        44.5432      0.0216855            518           1388          11103
           0.0026        48.2797      0.0214512            664           1373          10983
           0.0027        38.0917      0.0207715            350           1330          10635
           0.0027        56.0759       0.021627            871           1384          11073
           0.0027        51.2334       0.022498            432           1418          11339
           0.0027        44.5343      0.0218203            346           1398          11172
           0.0027        40.0295      0.0217305            680           1391          11126
           0.0027        44.5926      0.0211543            366           1355          10831
           0.0027        42.6079      0.0213555            374           1367          10934
           0.0027        43.1993      0.0219286            351           1380          11052
           0.0027        46.9033      0.0216815            934           1345          10754
           0.0027        51.9604      0.0216369            529           1363          10905
           0.0027        55.9463      0.0213367            812           1323          10583
           0.0027        46.6439      0.0219746            934           1407          11251
           0.0027        59.3573      0.0225742            656           1447          11558
           0.0027         69.646      0.0222031           1501           1421          11368
           0.0027        42.9243      0.0210645            375           1348          10785
           0.0027        40.6707      0.0206289            238           1321          10562
           0.0027        51.2241      0.0222004            770           1397          11189
           0.0027        59.3098       0.022793            687           1459          11670
           0.0027        40.4493      0.0218633            590           1400          11194
           0.0027        40.1637      0.0217852            270           1393          11154
           0.0028        51.5779      0.0229345            563           1445          11559
           0.0028        52.2257      0.0231885            605           1462          11687
           0.0028         40.277      0.0218407            322           1354          10833
           0.0028        46.1492      0.0230605            382           1475          11807
           0.0028        54.1505      0.0222207            621           1422          11377
           0.0028        48.7012      0.0218535            424           1399          11189
           0.0028        64.0472      0.0228313           1034           1440          11507
           0.0028        65.7295      0.0228867            866           1464          11718
           0.0028         69.681      0.0236329            870           1489          11911
           0.0028         92.441      0.0228848           1769           1465          11717
           0.0028        54.7544       0.022334            714           1429          11435
           0.0028        86.5382      0.0226797           1265           1451          11612
           0.0028        61.7621      0.0225595            886           1421          11370
           0.0028        48.2392        0.02275            452           1455          11648
           0.0028        51.9822      0.0220039            726           1407          11266
           0.0028        37.5978      0.0214043            298           1370          10959
           0.0028        65.0825      0.0227207           1190           1455          11633
           0.0028        66.7233       0.023756           1005           1496          11973
           0.0028        52.0785      0.0224961            621           1439          11518
           0.0028        55.2204      0.0236071            790           1488          11898
           0.0029        65.3309      0.0244048           1255           1538          12300
           0.0029        70.9309      0.0238869           1440           1505          12039
           0.0029        68.7864      0.0241032            894           1517          12148
           0.0029        67.5602      0.0232402           1216           1487          11899
           0.0029        90.2936      0.0238175           1646           1502          12004
           0.0029         64.742      0.0230254            806           1473          11789
           0.0029        50.8536      0.0235198            456           1482          11854
           0.0029        69.2169      0.0225293            976           1443          11535
           0.0029        48.9461      0.0228906            399           1465          11720
           0.0029        77.6051       0.023252           1137           1489          11905
           0.0029        71.6565      0.0238889            871           1505          12040
           0.0029        50.2365       0.022248            583           1425          11391
           0.0029         59.628      0.0230195            823           1473          11786
           0.0029        57.6922      0.0233301           1134           1491          11945
           0.0029        79.2769      0.0244821           1763           1542          12339
           0.0029        60.6664      0.0231895            845           1484          11873
           0.0029        50.8504      0.0224551            562           1437          11497
           0.0029        49.6306       0.022791            632           1459          11669
           0.0029        61.6498      0.0235137            770           1505          12039
           0.0029         70.569      0.0240098            883           1536          12293
            0.003        68.1931      0.0238867            729           1528          12230
            0.003        100.687      0.0242637           1891           1551          12423
            0.003        57.7967      0.0229785            798           1471          11765
            0.003        105.382      0.0254484           1545           1604          12826
            0.003        58.2655      0.0234023           1421           1499          11982
            0.003        76.8148      0.0240391            944           1539          12308
            0.003        98.6048      0.0245059           1549           1569          12547
            0.003        98.4069      0.0242123           1755           1526          12203
            0.003        83.4571      0.0246052           1196           1549          12401
            0.003         53.614      0.0228281            859           1461          11688
            0.003        63.4828      0.0236426            682           1512          12105
            0.003         110.24      0.0246448           2002           1554          12421
            0.003        89.2604      0.0252044           1239           1586          12703
            0.003        85.8796      0.0240098            929           1537          12293
            0.003        49.5691      0.0232051            823           1483          11881
            0.003        75.4228      0.0236895           1407           1516          12129
            0.003        70.4061      0.0239336            935           1529          12254
            0.003        69.8445      0.0240234            737           1537          12300
            0.003        58.6933      0.0234844            801           1503          12024
            0.003        72.2128      0.0230377            673           1452          11611
           0.0031        91.5503      0.0245586           2183           1570          12574
           0.0031        97.5983      0.0245566           1429           1571          12573
           0.0031        93.2032      0.0244121           1541           1560          12499
           0.0031        104.757      0.0251699           1960           1612          12887
           0.0031        115.788       0.024668           2380           1579          12630
           0.0031         86.501      0.0250317           1715           1577          12616
           0.0031        94.1274      0.0250516           1320           1578          12626
           0.0031        59.8557      0.0244688            668           1566          12528
           0.0031        78.5403      0.0246035           1156           1575          12597
           0.0031         136.51      0.0267581           3631           1659          13272
           0.0031        73.4212      0.0237813            907           1522          12176
           0.0031        79.5699      0.0249121            897           1595          12755
           0.0031        70.0849      0.0246602           1005           1578          12626
           0.0031        60.9462      0.0244643            556           1542          12330
           0.0031        97.2299       0.025084           1250           1605          12843
           0.0031        69.9363      0.0250806           1044           1554          12440
           0.0031        100.679      0.0254844           1520           1633          13048
           0.0031        93.7961      0.0250508           1384           1604          12826
           0.0031        58.0386      0.0234512            532           1502          12007
           0.0031         97.092       0.025459           1698           1630          13035
           0.0032        111.847      0.0261465           1974           1674          13387
           0.0032        95.2933      0.0248672           1903           1592          12732
           0.0032        120.217      0.0248965           1920           1596          12747
           0.0032        89.1779      0.0252698           2129           1591          12736
           0.0032        68.8728      0.0253274           1027           1596          12765
           0.0032        82.4328      0.0246504            784           1578          12621
           0.0032        119.889      0.0256777           2293           1645          13147
           0.0032        102.758       0.025418           1713           1628          13014
           0.0032        131.774      0.0247461           2720           1584          12670
           0.0032        156.923      0.0248594           4962           1592          12728
           0.0032         132.72      0.0260625           2490           1669          13344
           0.0032        132.542      0.0255625           1914           1635          13088
           0.0032        68.7751      0.0253574           1350           1623          12983
           0.0032        208.271      0.0260039           6396           1665          13314
           0.0032        82.5183       0.024332           1246           1557          12458
           0.0032        110.718      0.0251895           1478           1612          12897
           0.0032         88.068      0.0252617            982           1618          12934
           0.0032        179.235      0.0250566           3802           1604          12829
           0.0032        114.514      0.0248438           2150           1589          12720
           0.0032        152.683      0.0268008           4507           1714          13722
           0.0033        162.298      0.0261992           3754           1676          13414
           0.0033        160.026      0.0266465           2510           1707          13643
           0.0033        107.178      0.0261328           1235           1673          13380
           0.0033        184.582      0.0261169           2965           1620          12954
           0.0033        106.289      0.0258125           2049           1651          13216
           0.0033        120.004      0.0261738           1643           1676          13401
           0.0033        116.449      0.0262891           2171           1685          13460
           0.0033         129.28      0.0270139           2208           1701          13615
           0.0033        83.4608      0.0259603           1345           1634          13084
           0.0033        99.8945      0.0263555           1461           1687          13494
           0.0033        73.3229      0.0263353            847           1660          13273
           0.0033        83.2128      0.0253145           1237           1621          12961
           0.0033        169.213      0.0264355           2629           1692          13535
           0.0033        208.195      0.0263809           3590           1689          13507
           0.0033        277.354      0.0264512           7053           1691          13543
           0.0033        114.593       0.026127           1550           1672          13377
           0.0033        179.646      0.0272871           2841           1747          13971
           0.0033        134.469      0.0263457           2567           1685          13489
           0.0033        105.214      0.0264746           1201           1695          13555
           0.0033        142.417      0.0254785           3087           1630          13045
           0.0034        179.905      0.0278591           2941           1756          14041
           0.0034        148.059      0.0263105           4330           1684          13471
           0.0034        106.602      0.0268155           1312           1691          13515
           0.0034        144.737      0.0272207           2397           1741          13937
           0.0034        185.526      0.0277227           2878           1776          14194
           0.0034        135.458       0.026457           1894           1693          13546
           0.0034          195.1      0.0262402           3321           1678          13435
           0.0034        155.043      0.0263223           2770           1684          13477
           0.0034        297.247       0.026668           5688           1709          13654
           0.0034        139.706      0.0260332           2398           1666          13329
           0.0034        236.064      0.0275566           5118           1765          14109
           0.0034        118.429      0.0264824           1721           1695          13559
           0.0034         187.23      0.0271953           3761           1740          13924
           0.0034        159.202      0.0260137           3365           1665          13319
           0.0034        194.429      0.0274102           4706           1754          14034
           0.0034          180.4      0.0275323           2857           1707          13656
           0.0034         161.63      0.0266445           3182           1705          13642
           0.0034        112.895       0.026125           1442           1672          13376
           0.0034        187.773      0.0283589           3572           1759          14066
           0.0034        186.905      0.0267187           3528           1709          13680
           0.0035         128.31      0.0273535           1967           1751          14005
           0.0035         317.32      0.0268691           6120           1720          13757
           0.0035        130.235      0.0274563           2187           1730          13838
           0.0035        122.667      0.0271816           1689           1740          13917
           0.0035        150.224      0.0277109           2347           1772          14188
           0.0035        184.947      0.0275176           4262           1762          14089
           0.0035        232.188      0.0277617           4868           1778          14214
           0.0035        222.047       0.027082           5123           1734          13866
           0.0035        238.665      0.0273438           6791           1750          14000
           0.0035        199.228      0.0271387           4624           1736          13895
           0.0035        282.142      0.0278965           4803           1786          14283
           0.0035        317.809      0.0274297           5801           1756          14044
           0.0035        286.129       0.028125           5754           1800          14400
           0.0035        295.455      0.0280508           4983           1796          14362
           0.0035        238.418      0.0272187           6105           1741          13936
           0.0035        207.255      0.0269902           5564           1727          13819
           0.0035        188.094      0.0275586           2621           1765          14110
           0.0035        191.685      0.0280898           2521           1798          14382
           0.0035        200.942      0.0266816           6216           1707          13661
           0.0035        151.898      0.0266074           2562           1703          13623
           0.0036        307.096      0.0281567           6588           1776          14191
           0.0036         267.14      0.0274473           5337           1756          14053
           0.0036        277.188       0.027623           5395           1769          14143
           0.0036        264.892      0.0284629           4299           1821          14573
           0.0036        200.137      0.0275742           3658           1764          14118
           0.0036        218.012       0.028334           4585           1814          14507
           0.0036        455.189      0.0287877           6466           1815          14509
           0.0036        304.933       0.026875           6358           1720          13760
           0.0036        272.315      0.0278398           6191           1782          14254
           0.0036        284.763      0.0283671           4530           1787          14297
           0.0036        294.963      0.0283633           6825           1815          14522
           0.0036        324.331      0.0277109           4625           1775          14188
           0.0036        317.908      0.0272539           5057           1741          13954
           0.0036        344.858      0.0286816           7004           1836          14685
           0.0036        231.606      0.0283633           4014           1816          14522
           0.0036        312.796       0.028252           5730           1809          14465
           0.0036        199.961      0.0277871           3265           1778          14227
           0.0036        308.342      0.0282676           3458           1810          14473
           0.0036        167.976      0.0282344           2234           1808          14456
           0.0036         248.71      0.0279746           4126           1792          14323
];

rows = size(data, 1);
cols = size(data, 2);

data_delay = [];
for i = 1:rows/20,
   ifirst = (i - 1) * 20 + 1;
   ilast  = ifirst + 20 - 1;
   tmp = data(ifirst:ilast, cols-5+1);
   avg = mean(tmp);
   [h sig ci] = ttest(tmp, 0.1);
   ci = (ci(2)-ci(1))/2;
   data_delay = [data_delay; data(ifirst, 1:cols-5), avg ci];
end

figure(1);
hold on;
plot(data_delay(:,1), data_delay(:,2), symbol);

data_throughput = [];
for i = 1:rows/20,
   ifirst = (i - 1) * 20 + 1;
   ilast  = ifirst + 20 - 1;
   tmp = data(ifirst:ilast, cols-5+2);
   avg = mean(tmp);
   [h sig ci] = ttest(tmp, 0.1);
   ci = (ci(2)-ci(1))/2;
   data_throughput = [data_throughput; data(ifirst, 1:cols-5), avg ci];
end

figure(2);
hold on;
plot(data_throughput(:,1), data_throughput(:,2), symbol);

data_maxdelay = [];
for i = 1:rows/20,
   ifirst = (i - 1) * 20 + 1;
   ilast  = ifirst + 20 - 1;
   tmp = data(ifirst:ilast, cols-5+3);
   avg = mean(tmp);
   [h sig ci] = ttest(tmp, 0.1);
   ci = (ci(2)-ci(1))/2;
   data_maxdelay = [data_maxdelay; data(ifirst, 1:cols-5), avg ci];
end

figure(3);
hold on;
plot(data_maxdelay(:,1), data_maxdelay(:,2), symbol);


%-------- Saturation Analysis -----------
slope=[];
for i=2:size(data_throughput,1),
    slope(i-1) = (data_throughput(i,2)-data_throughput(i-1,2))/(data_throughput(i,1)-data_throughput(i-1,1));
end

for i=2:size(slope,2),
    if slope(i) < (0.95*mean(slope(1:i)))
        max_pir = data_throughput(i, 1);
        max_throughput = data_throughput(i, 2);
        min_delay = data_delay(i, 2);
        break;
    end
end
